from tortoise.models import Model
from tortoise import fields
from tortoise.contrib.pydantic import pydantic_model_creator

class Icon(Model):
  id = fields.IntField(pk=True)
  cnname = fields.CharField(max_length=50, null=True)
  enname = fields.CharField(max_length=50, null=True)

  class Meta:
    table = "icons"

Icon_Pydantic = pydantic_model_creator(Icon, name="Icon")
IconIn_Pydantic = pydantic_model_creator(Icon, name="IconIn", exclude_readonly=True)
